package com.freshmarket.freshmarket.service;

import com.freshmarket.freshmarket.controller.form.FormKillProduct;
import com.freshmarket.freshmarket.controller.form.KillProduct;
import com.freshmarket.freshmarket.entity.LimitedTimeOffer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.freshmarket.freshmarket.entity.ProductType;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-04
 */
public interface ILimitedTimeOfferService extends IService<LimitedTimeOffer> {
    /**
     * 查询所有类型
     * @return
     */
    List<ProductType> findNames();


    /**
     *
     *
     * @param productTypeId 商品类型ID
     * @return
     */
    List<FormKillProduct> findByProductTypeId(int productTypeId);

    /**
     *
     * @param id 商品id
     * @param number 商品数量
     * @return
     */
    String findByIdNum(int id,int number) ;

    /**
     * 添加秒杀商品
     * @param formKillProduct
     * @return
     */
    String addKillProduct(FormKillProduct formKillProduct);

    List<KillProduct> findAll();
}
